(function ($) {
	$.fn.xv_LazyImg=function()
	{
		var li = this;
		var win = $(window);
		var n = 0;
		var loadimg = function() {
				var st = win.scrollTop() + win.height();
				li.each(function() {
						var t = $(this);
						var ot = t.offset().top;
						if ((st >= ot && win.scrollTop()<= ot+t.height() )&& !t.attr("loaded")) {
								n++;
								t.fadeOut(1,function(){
									$(this).attr({"src":$(this).attr("xv_src"),"loaded":true}).fadeIn(444);
								})
						}
				});
				if (n == li.length) {
						win.unbind("scroll", loadimg);
				}
		};
		win.bind("scroll", loadimg);
		loadimg();
	}
	$.fn.xv_LazyImg.v = '1.0';//版本
})($)
